Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SnapStart Runtime Hooks #701

Closed
wants to merge 1 commit into from

Conversation

mbfreder
Copy link

@mbfreder mbfreder commented Oct 3, 2023

Issue #, if available:

Description of changes:
Implemented SnapStart Runtime Hooks

  • Added a crac::Resource trait
  • Implemented Builder pattern to allow registering crac::Resource with the Runtime
  • Removed the simulated connector
  • Refactor the test code to use httpmock to mock RAPID

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

Copy link

@roger-zhangg roger-zhangg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some comments


## Build & Deploy

1. Install [cargo-lambda](https://github.com/cargo-lambda/cargo-lambda#installation)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems https://www.cargo-lambda.info/guide/installation.html makes more sense here. There's no installation secion in this git

examples/basic-runtime-hooks/README.md Show resolved Hide resolved
assert_eq!(req.method(), Method::GET);
assert_eq!(req.uri(), &Uri::from_static("/2018-06-01/runtime/restore/next"));
assert!(match req.headers().get("User-Agent") {
Some(header) => header.to_str().unwrap().starts_with("aws-lambda-rust/"),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might prefer a Const instead of str value

Copy link
Contributor

@bnusunny bnusunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bnusunny bnusunny requested a review from calavera October 4, 2023 00:42
@greenwoodcm greenwoodcm closed this Oct 4, 2023
@calavera calavera mentioned this pull request Jan 16, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants